package com.eshopkeeper.provider.sys;

import com.baomidou.mybatisplus.plugins.Page;
import com.eshopkeeper.core.base.BaseProvider;
import com.eshopkeeper.core.support.login.ThirdPartyUser;
import com.eshopkeeper.model.sys.SysUser;
import com.eshopkeeper.model.sys.ext.SysUserBean;

import java.util.List;
import java.util.Map;

/**
 * SysUser服务接口
 *
 * @author chenshufeng
 * @version 2017-08-27 22:39:42
 */
public interface ISysUserProvider extends BaseProvider<SysUser> {

    public Page<SysUserBean> queryBeans(Map<String, Object> params);

    public String encryptPassword(String password);

    /**
     * 查询第三方帐号用户Id
     */
    public Long queryUserIdByThirdParty(String openId, String provider);

    /**
     * 保存第三方帐号
     */
    public SysUser insertThirdPartyUser(ThirdPartyUser thirdPartyUser);

    /**
     * 根据当前登录的用户查找他的权限
     * @param id
     * @return
     */
    public List<SysUserBean> getRole(Long id);

    /**
     * 加载所有用户信息
     */
    public void init();
    
    public int insertSysUser(SysUser sysUser);

	public void updateSysUser(Map<String, Object> paramMap);

    String getUserName(Map<String, Object> params);

    int updateUserRole(SysUser sysUser);

    public void updateFace(Map<String, Object> paramMap);

	int resetPassword(SysUser sysUser);

    SysUser queryUserById(Long id);

    /**
     * 查询慧驿站用户
     * 
     * @return
     * @throws Exception
     */
	public List<Map<String, Object>> getUserList() throws Exception;

    /**
     * Title:根据userid集合 获取用户的 名称和id
     * @return
     * @throws Exception
     */
	public List<Map<String,Object>> getCheckUser(List<Long> params) throws Exception;
	
}
